<template>
  <!-- 这是Echarts在vue项目中的基本演示 -->
  <!-- <EchartsDemoVue /> -->
  <!-- <div>首页，用来展示多个图表用的</div> -->
  <SalePieVue :data="state.salePie" />
  <SaleMapVue :data="state.saleMap" />
</template>

<script lang="ts" setup>
// import EchartsDemoVue from './EchartsDemo.vue';
import { GetIndexDataApi } from '@/request/api';
import { reactive } from 'vue';
import SaleMapVue from './components/SaleMap.vue';
import SalePieVue from './components/SalePie.vue';

const state = reactive<IIndexDataModel>({
  saleMap: [],
  salePie: []
})

GetIndexDataApi().then(res => {
  if (res.errno === 0) {
    state.saleMap = res.data.saleMap;
    state.salePie = res.data.salePie;
  }
})
</script>
 
<style lang="less" scoped>
</style>